//
//  NSSet+HACShield.m
//  HACRouter
//
//  Created by Chengjie on 2019/5/22.
//

#import "NSSet+HACShield.h"
#import "NSObject+HACSwizzling.h"

@implementation NSSet (HACShield)

/**
 __NSSingleObjectSetI
 __NSSetI
 */
+ (void)load {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        NSArray *tempArr = @[hac_getClass(@"__NSS", @"ingleObjectSetI"), hac_getClass(@"__NSS", @"etI")];
        for (Class cls in tempArr) {
            SEL sel_add_obj = @selector(addObject:);
            hac_swizzleInstanceMethod(cls, sel_add_obj, @selector(hac_addObject:));
            SEL sel_add_objs = @selector(addObjectsFromArray:);
            hac_swizzleInstanceMethod(cls, sel_add_objs, @selector(hac_addObjectsFromArray:));
            SEL sel_remove_obj = @selector(removeObject:);
            hac_swizzleInstanceMethod(cls, sel_remove_obj, @selector(hac_removeObject:));
        }
    });
}

- (void)hac_addObject:(id)object {}

- (void)hac_addObjectsFromArray:(NSArray *)array {}

- (void)hac_removeObject:(id)object {}

@end
